package control;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JTextField;

import model.ProxyExecution;

public class ExecListener implements ActionListener {

	private ProxyExecution execution;
	private JTextField textN;

	public ExecListener(ProxyExecution execution, JTextField textN) {
		this.execution = execution;
		this.textN = textN;
	}

	@Override
	public void actionPerformed(ActionEvent e) {

		execution.setParameter(Integer.parseInt(textN.getText()));
		execution.run();
	}

}
